#include "comm.hpp"

int main()
{
	FifoWork fifowork(FIFO_NAME, PATH);
	fifowork.OpenForClient();
	
	
	Shm shm(USER);
	char *arr = (char*)shm.VirtualAdd();
	char c = 'A';
	for(int i=0;i<20;i+=2,c+=2){
		arr[i] = c;
		sleep(2);
		arr[i+1] = c;
		sleep(2);

		arr[i+2] = 0;
		if(!fifowork.Wakeup())
			break;
	}

	fifowork.Close();
	std::cout << "Client process finished." << std::endl;

	return 0;
}